<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>
<body>
    <div style="width: 70%;margin-left: 20%;">
        <strong align="center">
            <span style="color: red;">备忘录:今天</span>
            <span style="color: blue;"  class="today"></span>
            <input id="input" type="text" placeholder="请输入备忘信息">
            <button id="submit">确定</button>
        </strong>
        <ol id="list1"></ol>
    </div>
    <script>
        var today=new Date();
        var week=today.getDay();
        var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
        document.getElementsByClassName("today")[0].innerHTML=weekday[week];
        var bot=document.getElementById("submit");
        var lis=document.getElementById("list1");
        var inpu=document.getElementById("input");
        bot.addEventListener("click",function(){
            var today=new Date();
            var str={year:'numeric',weekday:'long',month:'numeric',day:'numeric'};
            var datestr=today.toLocaleDateString('zh-CN',str)+' '+inpu.value;
            var li=document.createElement("li");

            li.textContent=datestr;
            lis.appendChild(li);
            inpu.value=" ";
        })
    </script>
</body>
</html>